<?php 
require_once("menugen.php");
?>		
		<nav class="navbar navbar-default" role="navigation">
				  <div class="container-fluid">
					<!-- Brand and toggle get grouped for better mobile display -->
					<div class="navbar-header">
					  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					  </button>
					 
					</div>

					<!-- Collect the nav links, forms, and other content for toggling -->
					<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					  <ul class="nav navbar-nav">
					 <?php
					 $i=0;
					 foreach($fronttxt As $Datafronttxt ){
					 $set_class="";
					 $li_class="";
					  $append="";
					  $arrow="";
					 if($link[$i]!="") $set_class='class="nav_link"';
					 else {$li_class='class="dropdown"';$arrow='<b class="caret"></b>';
					 $set_class='class="dropdown-toggle" data-toggle="dropdown"';}
					 $append.= '<li '.$li_class.'><a '.$set_class.' href="#" url="'.$link[$i].'" txt="'.$txt[$i].'">'.
					 $Datafronttxt.$arrow.'</a>';
						if($li_class!=""){
						 $j=0;
						$append.='<ul class="dropdown-menu">';
						// foreach($subfronttxt As $subi ){
						//  foreach($subi As $subj ){
						for($k=0;$k<$roundSub[$i];$k++){
						 $append.= '<li><a class="nav_link" href="#" url="'.$sublink[$i][$k].'" txt="'.$subfronttxt[$i][$k].'">'.$subtxt[$i][$k].'</a></li>';
						//  $append.= '<li><a class="nav_link" href="#" url="'.$sublink[$i][$j].'" txt="'.$subtxt[$i][$j].'">'.$subj.'</a></li>';
						  $j++;}
						  
						 //}
						 $append.="</ul>";
						}
						//}
						$append.="</li>";
						echo $append;
					 $i++;
					 }
					 ?>
					  </ul>
					  
					</div><!-- /.navbar-collapse -->
				  </div><!-- /.container-fluid -->
				</nav>	
		
